import request from "@/utils/request";
// 抽查导出
export function examSpotCheckexport(data) {
  return request({
    url: "/manager/examSpotCheck/export",
    method: "post",
    data: data,
  });
}
export function editRemark(data) {
  return request({
    url: "/manager/examSpotCheck/editRemark",
    method: "put",
    data: data,
  });
}

// 获取门店岗位树状结构
export function getSendstaffList(data) {
  return request({
    url: `/manager/medal/userList`,
    method: "get",
    params: data,
  });
}
export function getCategoryId(examld) {
  return request({
    url: `/manager/examSpotCheck/getCategoryId/${examld}`,
    method: "get",
  });
}

// 已发放人员列表
export function getPublishedUserList(examId) {
  return request({
    url: `/manager/examSpotCheck/getPublishedUserList/${examId}`,
    method: "get",
  });
}
// 抽查列表
export function examSpotCheckList(query) {
  return request({
    url: "/manager/examSpotCheck/list",
    method: "get",
    params: query,
  });
}
// 考核抽查补考申请列表
export function examSpotCheckExamApplyList(query) {
  return request({
    url: "/manager/examSpotCheck/examApply/list",
    method: "get",
    params: query,
  });
}
// 抽查情况
export function examSpotCheckSituationList(query) {
  return request({
    url: "/manager/examSpotCheck/situation/list",
    method: "get",
    params: query,
  });
}
// 新增抽查

export function examSpotCheckAdd(data) {
  return request({
    url: "/manager/examSpotCheck/add",
    method: "post",
    data: data,
  });
}
// 复制抽查
export function examSpotCheckCopy(id) {
  return request({
    url: `/manager/examSpotCheck/copy/${id}`,
    method: "post",
  });
}

// 删除抽查

export function examSpotCheckDel(id) {
  return request({
    url: `/manager/examSpotCheck/delSpotCheck/${id}`,
    method: "delete",
  });
}
// 发放抽查

export function distribute(examId, data) {
  return request({
    url: `/manager/examSpotCheck/distribute/${examId}`,
    method: "post",
    data: data,
  });
}

// 驳回o 通过 抽查补考申请

export function examSpotCheckDeals(data) {
  return request({
    url: `/manager/examSpotCheck/approvalExamApply`,
    method: "put",
    data: data,
  });
}
// 暂停和继续考核抽查

export function examSpotCheckPause(examId, status) {
  return request({
    url: `/manager/examSpotCheck/pause/${examId}/${status}`,
    method: "put",
  });
}
